The Linkage Trick

On systems such as UNIX where programs can read their own command line name, and where files may be linked to two or more names, then programs can modify their behavior according to the name by which they are called. Many UNIX TEX and installations exploit this in order to load different format and base files, one for each of the various names to which TEX and are linked. Such installations can often be recognised by the presence of the executable `virmf' in one of the directories in the PATH.

For example, if a base file called `third.base' resides where can find it (see section [*] below), then virmf can be linked to third. In UNIX, a hard link is formed by

    ln virmf third

On systems supporting symbolic links, you should make all of these links symbolic, rather than hard, or else you will have to redo them every time you install a new copy of virmf; see below. In UNIX, this is done by

    ln -s virmf third

Normally one wants mf to load the plain base, so in such installations one links plain.base to mf.base:

    ln plain.base mf.base
Again, you'd best make that link symbolic. This comment applies for the rest of this section as well.

As another example, take the `cm' base. In web2c:

    ln virmf cmmf
    ln cm.base cmmf.base
so that `cmmf' automatically loads `cm.base'.

This applies equally to TEX, which is why tex and latex are then links to virtex, tex.fmt is a link to plain.fmt, and latex.fmt is a link to lplain.fmt:

    ln virtex tex
    ln plain.fmt tex.fmt

    ln virtex latex
    ln lplain.fmt latex.fmt

Karl BERRY's web2c distribution for UNIX uses this `linkage trick'.

If you used symbolic links, you can laugh off the following

WARNING: This linkage is convenient, but watch out during updates! If mf.base is a hard link to plain.base, then replacing plain.base with its new version severs the link: mf will still load mf.base, but it will be the old version! The proper procedure is to remove the old mf.base, and relink. On UNIX:

    rm mf.base
    ln plain.base mf.base
On most UNIX systems, ln -f will automatically remove the second file (if present) — in this case, mf.base — before linking.

Alternatively, web2c will update `plain.base' (and `plain.fmt', and so on) for you, if you tell web2c's Makefile to

    make install
Symbolic links, on systems that have them, are probably the best method of handling updates, at least when doing them manually. (Consult your system administrator for details.)